package itsm.isperp.module.entity.app;

import itsm.isperp.framework.domain.IBean;
import itsm.isperp.framework.web.converter.CustomDateJsonSerializer;

import java.sql.Time;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.format.annotation.DateTimeFormat.ISO;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;

/**
 * 工作日历日期
 * 
 * @author lizx
 * @date 2013-5-12
 */
@Entity
@Table(name = "app_calendar_day")
public class AppCalendarDay implements IBean {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	protected String id;

	@JsonSerialize(using = CustomDateJsonSerializer.class)
	@DateTimeFormat(iso = ISO.DATE)
	@Column
	protected Date calendarDate;

	@DateTimeFormat(pattern = "HH:mm")
	@Column
	protected Time amBegin;

	@DateTimeFormat(pattern = "HH:mm")
	@Column
	protected Time amEnd;

	@DateTimeFormat(pattern = "HH:mm")
	@Column
	protected Time pmBegin;

	@DateTimeFormat(pattern = "HH:mm")
	@Column
	protected Time pmEnd;

	@Column
	protected boolean status;

	@Column
	protected String appCalendarConfigId;

	public String getId() {
		return id;
	}

	public Date getCalendarDate() {
		return calendarDate;
	}

	public Time getAmBegin() {
		return amBegin;
	}

	public Time getAmEnd() {
		return amEnd;
	}

	public Time getPmBegin() {
		return pmBegin;
	}

	public Time getPmEnd() {
		return pmEnd;
	}

	public boolean isStatus() {
		return status;
	}

	public String getAppCalendarConfigId() {
		return appCalendarConfigId;
	}

	public void setId(String id) {
		this.id = id;
	}

	public void setCalendarDate(Date calendarDate) {
		this.calendarDate = calendarDate;
	}

	public void setAmBegin(Time amBegin) {
		this.amBegin = amBegin;
	}

	public void setAmEnd(Time amEnd) {
		this.amEnd = amEnd;
	}

	public void setPmBegin(Time pmBegin) {
		this.pmBegin = pmBegin;
	}

	public void setPmEnd(Time pmEnd) {
		this.pmEnd = pmEnd;
	}

	public void setStatus(boolean status) {
		this.status = status;
	}

	public void setAppCalendarConfigId(String appCalendarConfigId) {
		this.appCalendarConfigId = appCalendarConfigId;
	}

}
